<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>后端引擎模板</title>
</head>
<body>

<nav th:fragment="header_backEnd(n)" class="ui inverted attached segment m-shadow-small">
    <div class="ui container">
        <!--stackable 表明可以堆列 移动端适配-->
        <div class="ui inverted stackable secondary menu m-min">
            <a th:href="@{/admin/index}">
                <h2 class="ui teal item header">
                    后台管理系统
                </h2>
            </a>
            <a th:href="@{/admin/index}" class="m-item item m-mobile-hide" th:classappend="${n == 0}?'active'"><i
                    class=" home icon"></i>主页</a>
            <a th:href="@{/admin/blogs}" class="m-item item m-mobile-hide" th:classappend="${n == 1}?'active'"><i
                    class=" home icon"></i>博客</a>
            <a th:href="@{/admin/categorys}" class="m-item item m-mobile-hide" th:classappend="${n == 2}?'active'"><i
                    class=" idea icon"></i>分类</a>
            <a th:href="@{/admin/labels}" class="m-item item m-mobile-hide" th:classappend="${n == 3}?'active'"><i
                    class=" tags icon"></i>标签</a>
            <a th:href="@{/admin/links}" class="m-item item m-mobile-hide" th:classappend="${n == 4}?'active'"><i
                    class=" compress icon"></i>友情链接</a>
            <a th:href="@{/admin/manager}" class="m-item item m-mobile-hide" th:classappend="${n == 5}?'active'"><i
                    class=" user circle icon"></i>管理员</a>
            <div class="right m-item item m-mobile-hide">
                <div class="ui item dropdown">
                    <div class="text">
                        <img class="ui avatar image" th:src="${session.user.avatar}" style="width: 28px;height: 28px;">
                        [[${session.user.nickName}]]
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <div class="floating ui red label" th:text="${unread}"></div>
                        <a th:href="@{/admin/notice}" class="item"> <i
                                class="bell outline icon"></i>通知
                        </a>
                        <a th:href="@{/admin/logout}" class="item" target="_blank"> <i
                                class="sign out alternate icon"></i>注销</a>
                    </div>
                </div>
            </div>
        </div>
        <a href="#" class="ui menu toggle black icon button m-mobile-top-right m-mobile-show">
            <i class="sidebar icon"></i>
        </a>
</nav>


</body>
</html>